<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>

<style>
    a{
        color: #ffffff;
    }
    h2{
        /*文字对齐*/
        text-align: center;
    }
</style>

<body>
<!--&lt;!&ndash;一开始写一个登录成功&ndash;&gt;-->
<!--<h2>登录成功</h2>-->

<h2>springboot-19期查询首页</h2>
<form th:action="@{/emp/selectOne}" method="post">
    <!--        form-control给input添加这个class后就会使用bootstrap自带的input框-->
    员工编号：<input class="form-control" placeholder="请输入员工编号" type="text" th:value="${empno}" name="empno"><br>
    <button class="btn btn-primary btn-lg btn-block">搜索</button>
</form>
<table class="table table-striped table-bordered table-hover text-center">
    <thead>
    <tr style="text-align: center">
        <th>员工编号</th>
        <th>员工姓名</th>
        <th>工作</th>
        <th>直属领导</th>
        <th>入职时间</th>
        <th>薪资</th>
        <th>津贴</th>
        <th>部门编号</th>
        <th>操作</th>
    </tr>
    </thead>
    <tr>
        <td th:text="${emp.empno}"></td>
        <td th:text="${emp.ename}"></td>
        <td th:text="${emp.job}"></td>
        <td th:text="${emp.mgr}"></td>
        <td th:text="${emp.hiredate}"></td>
        <td th:text="${emp.sal}"></td>
        <td th:text="${emp.comm}"></td>
        <td th:text="${emp.deptno}"></td>
        <td>
            <button class="btn btn-success"><a th:href="@{'/emp/updateEmp/'+${emp.empno}}">修改</a></button>
            <button class="btn btn-danger"><a th:href="@{'/emp/delete/'+${emp.empno}}">删除</a></button>
        </td>
    </tr>
</table>
</body>
</html>